home *** CD-ROM | disk | FTP | other *** search
/ PC Home 138 / PC Home issue 138.iso / Software / Essentials / Netscape / browser.xpi / bin / components / nsUpdateNotifier.js < prev    next >
Encoding:
Text File  |  2002-10-07  |  19.9 KB  |  607 lines

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3.  *
  4.  * The contents of this file are subject to the Mozilla Public License Version
  5.  * 1.1 (the "License"); you may not use this file except in compliance with
  6.  * the License. You may obtain a copy of the License at
  7.  * http://www.mozilla.org/MPL/
  8.  *
  9.  * Software distributed under the License is distributed on an "AS IS" basis,
  10.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11.  * for the specific language governing rights and limitations under the
  12.  * License.
  13.  *
  14.  * The Original Code is the Update Notifier.
  15.  *
  16.  * The Initial Developer of the Original Code is 
  17.  * Netscape Communications Corporation.
  18.  * Portions created by the Initial Developer are Copyright (C) 2002
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *  Samir Gehani <sgehani@netscape.com> (Original Author) 
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. const kDebug               = false;
  39. const kUpdateCheckDelay    = 5 * 60 * 1000; // 5 minutes
  40. const kUNEnabledPref       = "update_notifications.enabled";
  41. const kUNDatasourceURIPref = "update_notifications.provider.0.datasource";
  42. const kUNFrequencyPref     = "update_notifications.provider.0.frequency";
  43. const kUNLastCheckedPref   = "update_notifications.provider.0.last_checked";
  44. const kUNBundleURI         = 
  45.   "chrome://communicator/locale/update-notifications.properties";
  46.  
  47. ////////////////////////////////////////////////////////////////////////
  48. // 
  49. //   nsUpdateNotifier : nsIProfileStartupListener, nsIObserver
  50. //
  51. //   Checks for updates of the client by polling a distributor's website
  52. //   for the latest available version of the software and comparing it
  53. //   with the version of the running client.
  54. //
  55. ////////////////////////////////////////////////////////////////////////
  56.  
  57. var nsUpdateNotifier = 
  58. {
  59.   onProfileStartup: function(aProfileName)
  60.   {
  61.     debug("onProfileStartup");
  62.  
  63.     // now wait for the first app window to open
  64.     var observerService = Components.
  65.       classes["@mozilla.org/observer-service;1"].
  66.       getService(Components.interfaces.nsIObserverService);
  67.     observerService.addObserver(this, "domwindowopened", false);
  68.   },
  69.  
  70.   mTimer: null, // need to hold on to timer ref
  71.  
  72.   observe: function(aSubject, aTopic, aData)
  73.   {
  74.     debug("observe: " + aTopic);
  75.  
  76.     if (aTopic == "domwindowopened")
  77.     {
  78.       try 
  79.       {
  80.         const kIScriptableTimer = Components.interfaces.nsIScriptableTimer;
  81.         mTimer = Components.classes["@mozilla.org/timer;1"].
  82.           createInstance(kIScriptableTimer);
  83.         mTimer.init(this, kUpdateCheckDelay, kIScriptableTimer.PRIORITY_NORMAL,
  84.           kIScriptableTimer.TYPE_ONE_SHOT);
  85.  
  86.         // we are no longer interested in the ``domwindowopened'' topic
  87.         var observerService = Components.
  88.           classes["@mozilla.org/observer-service;1"].
  89.           getService(Components.interfaces.nsIObserverService);
  90.         observerService.removeObserver(this, "domwindowopened");
  91.       }
  92.       catch (ex)
  93.       {
  94.         debug("Exception init'ing timer: " + ex);
  95.       }
  96.     }
  97.     else if (aTopic == "timer-callback")
  98.     {
  99.       mTimer = null; // free up timer so it can be gc'ed
  100.       this.checkForUpdate();
  101.     }
  102.   },
  103.  
  104.   checkForUpdate: function()
  105.   {
  106.     debug("checkForUpdate");
  107.     
  108.     if (this.shouldCheckForUpdate())
  109.     {
  110.       try
  111.       {
  112.         // get update ds URI from prefs
  113.         var prefs = Components.classes["@mozilla.org/preferences-service;1"].
  114.           getService(Components.interfaces.nsIPrefBranch);
  115.         var updateDatasourceURI = prefs.
  116.           getComplexValue(kUNDatasourceURIPref,
  117.           Components.interfaces.nsIPrefLocalizedString).data;
  118.  
  119.         var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].
  120.           getService(Components.interfaces.nsIRDFService);
  121.         var ds = rdf.GetDataSource(updateDatasourceURI);
  122.         
  123.         ds = ds.QueryInterface(Components.interfaces.nsIRDFXMLSink);
  124.         ds.addXMLSinkObserver(nsUpdateDatasourceObserver);
  125.       }
  126.       catch (ex)
  127.       {
  128.         debug("Exception getting updates.rdf: " + ex);
  129.       }
  130.     }
  131.   },
  132.  
  133.   shouldCheckForUpdate: function()
  134.   {
  135.     debug("shouldCheckForUpdate");
  136.  
  137.     var shouldCheck = false;
  138.  
  139.     try
  140.     {
  141.       var prefs = Components.classes["@mozilla.org/preferences-service;1"].
  142.         getService(Components.interfaces.nsIPrefBranch);
  143.   
  144.       if (prefs.getBoolPref(kUNEnabledPref))
  145.       {
  146.         var freq = prefs.getIntPref(kUNFrequencyPref) * (24 * 60 * 60); // secs
  147.         var now = (new Date().valueOf())/1000; // secs
  148.  
  149.         if (!prefs.prefHasUserValue(kUNLastCheckedPref))
  150.         {
  151.           // setting last_checked pref first time so must randomize in 
  152.           // order that servers don't get flooded with updates.rdf checks
  153.           // (and eventually downloads of new clients) all at the same time
  154.  
  155.           var randomizedLastChecked = now + freq * (1 + Math.random());
  156.           prefs.setIntPref(kUNLastCheckedPref, randomizedLastChecked);
  157.  
  158.           return false;
  159.         }
  160.  
  161.         var lastChecked = prefs.getIntPref(kUNLastCheckedPref);
  162.         if ((lastChecked + freq) > now)
  163.           return false;
  164.         
  165.         prefs.setIntPref(kUNLastCheckedPref, now);
  166.         prefs = prefs.QueryInterface(Components.interfaces.nsIPrefService);
  167.         prefs.savePrefFile(null); // flush prefs now
  168.  
  169.         shouldCheck = true;
  170.       }
  171.     }
  172.     catch (ex)
  173.     {
  174.       shouldCheck = false;
  175.       debug("Exception in shouldCheckForUpdate: " + ex);
  176.     }
  177.  
  178.     return shouldCheck;
  179.   },
  180.  
  181.   QueryInterface: function(aIID)
  182.   {
  183.     if (!aIID.equals(Components.interfaces.nsIObserver) &&
  184.         !aIID.equals(Components.interfaces.nsIProfileStartupListener) &&
  185.         !aIID.equals(Components.interfaces.nsISupports))
  186.       throw Components.results.NS_ERROR_NO_INTERFACE;
  187.  
  188.     return this;
  189.   }
  190. }
  191.  
  192. ////////////////////////////////////////////////////////////////////////
  193. //
  194. //   nsUpdateDatasourceObserver : nsIRDFXMLSinkObserver
  195. //
  196. //   Gets relevant info on latest available update after the updates.rdf
  197. //   datasource has completed loading asynchronously.
  198. //
  199. ////////////////////////////////////////////////////////////////////////
  200.  
  201. var nsUpdateDatasourceObserver = 
  202. {
  203.   onBeginLoad: function(aSink)
  204.   {
  205.   },
  206.  
  207.   onInterrupt: function(aSink)
  208.   {
  209.   },
  210.  
  211.   onResume: function(aSink)
  212.   {
  213.   },
  214.  
  215.   onEndLoad: function(aSink)
  216.   {
  217.     debug("onEndLoad");
  218.     
  219.     aSink.removeXMLSinkObserver(this);
  220.  
  221.     var ds = aSink.QueryInterface(Components.interfaces.nsIRDFDataSource);
  222.     var updateInfo = this.getUpdateInfo(ds);
  223.     if (updateInfo && this.newerVersionAvailable(updateInfo))
  224.     {
  225.       var promptService = Components.
  226.         classes["@mozilla.org/embedcomp/prompt-service;1"].
  227.         getService(Components.interfaces.nsIPromptService);
  228.       var winWatcher = Components.
  229.         classes["@mozilla.org/embedcomp/window-watcher;1"].
  230.         getService(Components.interfaces.nsIWindowWatcher);
  231.       
  232.       var unBundle = this.getBundle(kUNBundleURI);
  233.       if (!unBundle)
  234.         return;
  235.  
  236.       var title = unBundle.formatStringFromName("title", 
  237.         [updateInfo.productName], 1);
  238.       var desc = unBundle.formatStringFromName("desc", 
  239.         [updateInfo.productName], 1);
  240.       var button0Text = unBundle.GetStringFromName("getItNow");
  241.       var button1Text = unBundle.GetStringFromName("noThanks");
  242.       var checkMsg = unBundle.GetStringFromName("dontAskAgain");
  243.       var checkVal = {value:0};
  244.  
  245.       var result = promptService.confirmEx(winWatcher.activeWindow, title, desc, 
  246.         (promptService.BUTTON_POS_0 * promptService.BUTTON_TITLE_IS_STRING) +
  247.         (promptService.BUTTON_POS_1 * promptService.BUTTON_TITLE_IS_STRING),
  248.         button0Text, button1Text, null, checkMsg, checkVal);
  249.  
  250.       // user wants update now so open new window 
  251.       // (result => 0 is button0)
  252.       if (result == 0)
  253.         winWatcher.openWindow(winWatcher.activeWindow, updateInfo.URL, 
  254.           "_blank", "", null);
  255.  
  256.       // if "Don't ask again" was checked disable update notifications
  257.       if (checkVal.value)
  258.       {
  259.         var prefs = Components.classes["@mozilla.org/preferences-service;1"].
  260.           getService(Components.interfaces.nsIPrefBranch);
  261.         prefs.setBoolPref(kUNEnabledPref, false);
  262.       }
  263.     }
  264.   },
  265.  
  266.   onError: function(aSink, aStatus, aErrorMsg)
  267.   {
  268.     debug("Error " + aStatus + ": " + aErrorMsg);
  269.     aSink.removeXMLSinkObserver(this);
  270.   },
  271.  
  272.   getUpdateInfo: function(aDS)
  273.   {
  274.     var info = null;
  275.  
  276.     try
  277.     {
  278.       var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].
  279.         getService(Components.interfaces.nsIRDFService);
  280.       var src = "urn:updates:latest";
  281.  
  282.       info = new Object;
  283.       info.registryName = this.getTarget(rdf, aDS, src, "registryName");
  284.       info.version = this.getTarget(rdf, aDS, src, "version");
  285.       info.URL = this.getTarget(rdf, aDS, src, "URL");
  286.       info.productName = this.getTarget(rdf, aDS, src, "productName");
  287.     }
  288.     catch (ex)
  289.     {
  290.       info = null;
  291.       debug("Exception getting update info: " + ex);
  292.  
  293.       // NOTE: If the (possibly remote) datasource doesn't exist 
  294.       //       or fails to load the first |GetTarget()| call will fail
  295.       //       bringing us to this exception handler.  In turn, we 
  296.       //       will fail silently.  Testing has revealed that for a 
  297.       //       non-existent datasource (invalid URI) the 
  298.       //       |nsIRDFXMLSinkObserver.onEndLoad()| is called instead of
  299.       //       |nsIRDFXMLSinkObserver.onError()| as one may expect.  In 
  300.       //       addition, if we QI the aSink parameter of |onEndLoad()| 
  301.       //       to an |nsIRDFRemoteDataSource| and check the |loaded| 
  302.       //       boolean, it reflects true so we can't use that.  The 
  303.       //       safe way to know we have failed to load the datasource 
  304.       //       is by handling the first exception as we are doing now.
  305.     }
  306.  
  307.     return info;
  308.   },
  309.  
  310.   getTarget: function(aRDF, aDS, aSrc, aProp)
  311.   {
  312.     var src = aRDF.GetResource(aSrc);
  313.     var arc = aRDF.GetResource("http://home.netscape.com/NC-rdf#" + aProp);
  314.     var target = aDS.GetTarget(src, arc, true);
  315.     return target.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
  316.   },
  317.  
  318.   newerVersionAvailable: function(aUpdateInfo)
  319.   {
  320.     // sanity check 
  321.     if (!aUpdateInfo.registryName || !aUpdateInfo.version)
  322.     {
  323.       debug("Sanity check failed: aUpdateInfo is invalid!");
  324.       return false;
  325.     }
  326.  
  327.     // when we know we are updating the ``Browser'' component
  328.     // we can rely on Necko to give us the app version
  329.  
  330.     if (aUpdateInfo.registryName == "Browser")
  331.       return this.neckoHaveNewer(aUpdateInfo);
  332.  
  333.     return this.xpinstallHaveNewer(aUpdateInfo);
  334.   },
  335.  
  336.   neckoHaveNewer: function(aUpdateInfo)
  337.   {
  338.     try
  339.     {
  340.       var httpHandler = Components.
  341.         classes["@mozilla.org/network/protocol;1?name=http"].
  342.         getService(Components.interfaces.nsIHttpProtocolHandler);
  343.       var synthesized = this.synthesizeVersion(httpHandler.misc, 
  344.         httpHandler.productSub);
  345.       var local = new nsVersion(synthesized);
  346.       var server = new nsVersion(aUpdateInfo.version); 
  347.  
  348.       return (server.isNewerThan(local));
  349.     }
  350.     catch (ex)
  351.     {
  352.       // fail silently
  353.       debug("Exception getting httpHandler: " + ex);
  354.       return false;
  355.     }
  356.  
  357.     return false; // return value expected from this function
  358.   }, 
  359.  
  360.   xpinstallHaveNewer: function(aUpdateInfo)
  361.   {
  362.     // XXX Once InstallTrigger is a component we will be able to
  363.     //     get at it without needing to reference it from hiddenDOMWindow.
  364.     //     This will enable us to |compareVersion()|s even when 
  365.     //     XPInstall is disabled but update notifications are enabled.
  366.     //     See <http://bugzilla.mozilla.org/show_bug.cgi?id=121506>.
  367.     var ass = Components.classes["@mozilla.org/appshell/appShellService;1"].
  368.       getService(Components.interfaces.nsIAppShellService);
  369.     var trigger = ass.hiddenDOMWindow.InstallTrigger;
  370.     var diffLevel = trigger.compareVersion(aUpdateInfo.registryName, 
  371.       aUpdateInfo.version);
  372.     if (diffLevel < trigger.EQUAL && diffLevel != trigger.NOT_FOUND)
  373.       return true;
  374.     return false; // already have newer version or 
  375.                   // fail silently if old version not found on disk
  376.   },
  377.  
  378.   synthesizeVersion: function(aMisc, aProductSub)
  379.   {
  380.     // Strip out portion of nsIHttpProtocolHandler.misc that
  381.     // contains version info and stuff all ``missing'' portions
  382.     // with a default 0 value.  We are interested in the first 3
  383.     // numbers delimited by periods.  The 4th comes from aProductSub.
  384.     // e.g., x => x.0.0, x.1 => x.1.0, x.1.2 => x.1.2, x.1.2.3 => x.1.2
  385.     
  386.     var synthesized = "0.0.0.";
  387.  
  388.     // match only digits and periods after "rv:" in the misc
  389.     var onlyVer = /rv:([0-9.]+)/.exec(aMisc);
  390.  
  391.     // original string in onlyVer[0], matched substring in onlyVer[1]
  392.     if (onlyVer && onlyVer.length >= 2) 
  393.     {
  394.       var parts = onlyVer[1].split('.');
  395.       var len = parts.length;
  396.       if (len > 0)
  397.       {
  398.         synthesized = "";
  399.  
  400.         // extract first 3 dot delimited numbers in misc (after "rv:")
  401.         for (var i = 0; i < 3; ++i)
  402.         {
  403.           synthesized += ((len >= i+1) ? parts[i] : "0") + ".";
  404.         }
  405.       }
  406.     }
  407.  
  408.     // tack on productSub for nsVersion.mBuild field if available
  409.     synthesized += aProductSub ? aProductSub : "0";
  410.    
  411.     return synthesized;
  412.   },
  413.  
  414.   getBundle: function(aURI)
  415.   {
  416.     if (!aURI)
  417.       return null;
  418.  
  419.     var bundle = null;
  420.     try
  421.     {
  422.       var strBundleService = Components.
  423.         classes["@mozilla.org/intl/stringbundle;1"].
  424.         getService(Components.interfaces.nsIStringBundleService);
  425.       bundle = strBundleService.createBundle(aURI);
  426.     }
  427.     catch (ex)
  428.     {
  429.       bundle = null;
  430.       debug("Exception getting bundle " + aURI + ": " + ex);
  431.     }
  432.  
  433.     return bundle;
  434.   }
  435. }
  436.  
  437. ////////////////////////////////////////////////////////////////////////
  438. //
  439. //   nsVersion
  440. //
  441. //   Constructs a version object given a string representation.  This
  442. //   constructor populates the mMajor, mMinor, mRelease, and mBuild
  443. //   fields regardless of whether string contains all the fields.  
  444. //   The default for all unspecified fields is 0.
  445. //
  446. ////////////////////////////////////////////////////////////////////////
  447.  
  448. function nsVersion(aStringVersion)
  449. {
  450.   var parts = aStringVersion.split('.');
  451.   var len = parts.length;
  452.  
  453.   this.mMajor   = (len >= 1) ? this.getValidInt(parts[0]) : 0;
  454.   this.mMinor   = (len >= 2) ? this.getValidInt(parts[1]) : 0;
  455.   this.mRelease = (len >= 3) ? this.getValidInt(parts[2]) : 0;
  456.   this.mBuild   = (len >= 4) ? this.getValidInt(parts[3]) : 0;
  457. }
  458.  
  459. nsVersion.prototype = 
  460. {
  461.   isNewerThan: function(aOther)
  462.   {
  463.     if (this.mMajor == aOther.mMajor)
  464.     {
  465.       if (this.mMinor == aOther.mMinor)
  466.       {
  467.         if (this.mRelease == aOther.mRelease)
  468.         {
  469.           if (this.mBuild <= aOther.mBuild)
  470.             return false;
  471.           else
  472.             return true; // build is newer
  473.         }
  474.         else if (this.mRelease < aOther.mRelease)
  475.           return false;
  476.         else
  477.           return true; // release is newer
  478.       }
  479.       else if (this.mMinor < aOther.mMinor)
  480.         return false;
  481.       else
  482.         return true; // minor is newer
  483.     }
  484.     else if (this.mMajor < aOther.mMajor)
  485.       return false;
  486.     else
  487.       return true; // major is newer
  488.  
  489.     return false;
  490.   },
  491.  
  492.   getValidInt: function(aString)
  493.   {
  494.     var integer = parseInt(aString);
  495.     if (isNaN(integer))
  496.       return 0;
  497.     return integer;
  498.   }
  499. }
  500.  
  501. ////////////////////////////////////////////////////////////////////////
  502. //
  503. //   nsUpdateNotifierModule : nsIModule
  504. //
  505. ////////////////////////////////////////////////////////////////////////
  506.  
  507. var nsUpdateNotifierModule = 
  508. {
  509.   mClassName:     "Update Notifier",
  510.   mContractID:    "@mozilla.org/update-notifier;1",
  511.   mClassID:       Components.ID("8b6dcf5e-3b5a-4fff-bff5-65a8fa9d71b2"),
  512.  
  513.   getClassObject: function(aCompMgr, aCID, aIID)
  514.   {
  515.     if (!aCID.equals(this.mClassID))
  516.       throw Components.results.NS_ERROR_NO_INTERFACE;
  517.     if (!aIID.equals(Components.interfaces.nsIFactory))
  518.       throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
  519.  
  520.     return this.mFactory;
  521.   },
  522.  
  523.   registerSelf: function(aCompMgr, aFileSpec, aLocation, aType)
  524.   {
  525.     if (kDebug)
  526.       dump("*** Registering nsUpdateNotifier (a JavaScript Module)\n");
  527.  
  528.     // XXX The new version of nsIComponentManager (once completed)
  529.     //     will obviate the need to QI to nsIComponentManagerObsolete.
  530.     //     See <http://bugzilla.mozilla.org/show_bug.cgi?id=115853>.
  531.     aCompMgr = aCompMgr.QueryInterface(
  532.                  Components.interfaces.nsIComponentManagerObsolete);
  533.     aCompMgr.registerComponentWithType(this.mClassID, this.mClassName,
  534.       this.mContractID, aFileSpec, aLocation, true, true, aType);
  535.  
  536.     // receive startup notification from the profile manager
  537.     // (we get |createInstance()|d at startup-notification time)
  538.     this.getCategoryManager().addCategoryEntry("profile-startup-category", 
  539.       this.mContractID, "", true, true);
  540.   },
  541.  
  542.   unregisterSelf: function(aCompMgr, aFileSpec, aLocation)
  543.   {
  544.     // XXX The new version of nsIComponentManager (once completed)
  545.     //     will obviate the need to QI to nsIComponentManagerObsolete.
  546.     //     See <http://bugzilla.mozilla.org/show_bug.cgi?id=115853>.
  547.     aCompMgr = aCompMgr.QueryInterface(
  548.                  Components.interfaces.nsIComponentManagerObsolete);
  549.     aCompMgr.unregisterComponentSpec(this.mClassID, aFileSpec);
  550.  
  551.     this.getCategoryManager().deleteCategoryEntry("profile-startup-category", 
  552.       this.mContractID, true);
  553.   },
  554.  
  555.   canUnload: function(aCompMgr)
  556.   {
  557.     return true;
  558.   },
  559.  
  560.   getCategoryManager: function()
  561.   {
  562.     return Components.classes["@mozilla.org/categorymanager;1"].
  563.       getService(Components.interfaces.nsICategoryManager);
  564.   },
  565.  
  566.   //////////////////////////////////////////////////////////////////////
  567.   //
  568.   //   mFactory : nsIFactory
  569.   //
  570.   //////////////////////////////////////////////////////////////////////
  571.   mFactory:
  572.   {
  573.     createInstance: function(aOuter, aIID)
  574.     {
  575.       if (aOuter != null)
  576.         throw Components.results.NS_ERROR_NO_AGGREGATION;
  577.       if (!aIID.equals(Components.interfaces.nsIObserver) &&
  578.           !aIID.equals(Components.interfaces.nsIProfileStartupListener) &&
  579.           !aIID.equals(Components.interfaces.nsISupports))
  580.         throw Components.results.NS_ERROR_INVALID_ARG;
  581.  
  582.       // return the singleton 
  583.       return nsUpdateNotifier.QueryInterface(aIID);
  584.     },
  585.  
  586.     lockFactory: function(aLock)
  587.     {
  588.       // quiten warnings
  589.     }
  590.   }
  591. };
  592.  
  593. function NSGetModule(aCompMgr, aFileSpec)
  594. {
  595.   return nsUpdateNotifierModule;
  596. }
  597.  
  598. ////////////////////////////////////////////////////////////////////////
  599. //
  600. //   Debug helper
  601. //
  602. ////////////////////////////////////////////////////////////////////////
  603. if (!kDebug)
  604.   debug = function(m) {};
  605. else
  606.   debug = function(m) {dump("\t *** nsUpdateNotifier: " + m + "\n");};
  607.